<div>

<div class="modal-header">
    <h4 class="modal-title">设置顶图</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-2" ng-repeat="obj in imagearr track by $index">
            
            <!-- x -->
            <button style="margin-left: 10px" ng-click="imageDel($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>

            <!-- 往后 -->
            <button style="margin-left: 10px" ng-if="$index != imagearr.length - 1" ng-click="imageDown($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&darr;</span></button>
            <!-- 往前 -->
            <button style="margin-left: 10px" ng-if="$index != 0" ng-click="imageUp($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&uarr;</span></button>

            <img ng-src="{{obj.url}}" class="img-thumbnail img-responsive">

        </div>
        
    </div>
    
</div>

</div>
<div class="modal-footer">
    <button class="btn btn-success" ng-click="setImage()">添加图片</button>
</div>


<hr>

<div class="modal-header">
    <h4 class="modal-title">设置预定须知</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="row">
        <textarea class="form-control" rows="3" ng-model="bookingnotes"></textarea>
    </div>
        
</div>

</div>

<hr>



<div class="modal-header">
    <h4 class="modal-title">商品详情</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="row " >
        <div class=" row " ng-repeat="detail in detailarr track by $index">
            <!-- <div ng-if="detail.type == 'text'" class="row">
                {{detail.value}}
            </div> -->
            <div class="col-sm-4 col-xs-12">
            <textarea ng-if="detail.type == 'text'"
             class="form-control" rows="3" ng-model="detail.value"></textarea>

            <div ng-if="detail.type == 'image'" class="row">
                <image ng-src="{{detail.value}}" width="100%" >
            </div>

            <!-- x -->
            <button style="margin-left: 10px" ng-click="detailDel($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <!-- 下 -->
            <button style="margin-left: 10px" ng-if="$index != detailarr.length - 1" ng-click="detailDown($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&darr;</span></button>
            <!-- 上 -->
            <button style="margin-left: 10px" ng-if="$index != 0" ng-click="detailUp($index)" type="button" class="close" aria-label="Close"><span aria-hidden="true">&uarr;</span></button>
            </div>
        </div>
    </div>

    <div class="row mt10">
        <label class="i-checks  checkbox-inline">
          <input type="radio" value='1' name='detailType'
          ng-model="detailType"
          >
          <i></i>
          文字
        </label>

        <label class="i-checks  checkbox-inline">
          <input type="radio" value='2' name='detailType'
          ng-model="detailType"
          >
          <i></i>
          图片
        </label>
    </div>

    <div class="row mt10" ng-if="detailType == '1'">
        <textarea class="form-control" rows="3" ng-model="detailTxt"></textarea>
        <button class="btn btn-success mt10" ng-click="setDetail(detailTxt)">添加</button>
    </div>
    <div class="row mt10" ng-if="detailType == '2'">
        <button class="btn btn-success" ng-click="setDetailImage()">添加图片</button>
    </div>
</div>

</div>


<hr>


<div class="modal-header">
    <h4 class="modal-title">设置推广文字</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="row">
        <div class="alert alert-warning alert-dismissible" role="alert"
         ng-repeat="text in textarr"
        >
          <button type="button" class="close" aria-label="Close" ng-click="del_text($index)"><span aria-hidden="true">&times;</span></button>
          &nbsp;&nbsp;&nbsp;&nbsp;
          <button
            ng-if="$index != textarr.length - 1"
            type="button" class="close" aria-label="Close" ng-click="textDown($index)"><span aria-hidden="true">&darr;</span></button>
          &nbsp;&nbsp;&nbsp;&nbsp;
          <button
            ng-if="$index != 0"
            type="button" class="close" aria-label="Close" ng-click="textUp($index)"><span aria-hidden="true">&uarr;</span></button>

            {{text}}
        </div>

    </div>

    <div class="row">
        <textarea class="form-control" rows="3" ng-model="text"></textarea>
    </div>


        
</div>

</div>
<div class="modal-footer">
    <button class="btn btn-success" ng-click="setText()">添加文字</button>
</div>

<div class="modal-footer">
    <button class="btn btn-primary" type="button" ng-click="gogo()">保存</button>
    <button class="btn btn-warning" type="button" ng-click="cancel()">返回</button>
</div>


</div>